package com.turboconnard.menu;

import java.util.Vector;

import com.turboconnard.events.EventDispatcher;
import com.turboconnard.events.MenuEvent;


public class AndroidMenuItem extends EventDispatcher {
	public String label;
	public int icon = -1;
	public int group = 0;
	public int id = 0;
	public boolean enabled;
	
	public Vector<AndroidMenuItem> subMenus;
	public AndroidMenuItem(String pLabel){
		id = MainMenu.getInstance().getUniqueId();
		label = pLabel;
		subMenus =  new Vector<AndroidMenuItem>();
	}
	public AndroidMenuItem(String pLabel,int pIcon){
		id = MainMenu.getInstance().getUniqueId();
		label = pLabel;
		icon = pIcon;	
		subMenus =  new Vector<AndroidMenuItem>();
	}
	public void addItem(AndroidMenuItem ami) {
		subMenus.add(ami);
	}
	public void select() {
		// TODO Auto-generated method stub
		dispatchEvent(new MenuEvent(MenuEvent.SELECT));
	}
}
